package com.gxa.utils;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.stereotype.Component;

/**
 * 返回数据
 */
@ApiModel(value = "返回数据")
@Component
public class ResponseData<T>{
	/**
	 * 状态码
	 */
	@ApiModelProperty(name = "code",notes = "状态码",value = "状态码")
	private int code;
	/**
	 * 返回信息
	 */
	@ApiModelProperty(name = "msg",notes = "返回信息",value = "返回信息")
	private String msg;
	/**
	 * 返回数据
	 */
	@ApiModelProperty(name = "data",notes = "返回数据",value = "返回数据")
	private T data;
	/**
	 * token
	 */
	@ApiModelProperty(name = "token",notes = "token",value = "token")
	private String token;

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	@Override
	public String toString() {
		return "ResponseData{" +
				"code=" + code +
				", msg='" + msg + '\'' +
				", data=" + data +
				", token='" + token + '\'' +
				'}';
	}
}
